package net.ozgul.chordmaster;

import java.util.ArrayList;
import java.util.List;

public class Chord {

  private final ChordType chordType;
  private final Note rootNote;
  
  Chord(Note rootNote, ChordType chordType) {
    this.rootNote = rootNote;
    this.chordType = chordType;
  }
  
  List<Note> getSpelling() {
    List<Note> notes = new ArrayList<Note>();
    for (Interval interval : chordType) {
      // find the note at this interval for the major scale of the root note. 
      notes.add(rootNote.getNoteAtInterval(interval));
    }
    return notes;
  }
}